set terminal pdf monochrome
set nokey
set pointsize 0.5
file = "bultfit"

set xlabel "Aantal stappen"
set ylabel "Aanal keer dat de stap voorkomt\n op 5 miljoen simulaties"

set xrange [0:400]

f(x)=v*((x-h)**(k-1))*exp(-x/th)
v=75
h=2
k=2
th=33
fit f(x) file."KE" via v,h,k,th

set output "bultfitKE.pdf"
plot file."KE" pt 6 lw 2, \
	f(x) lw 2 
	
f(x)=v*((x-h)**(k-1))*exp(-x/th)
v=750
h=4
k=2
th=33
fit f(x) file."KO" via v,h,k,th

set output "bultfitKO.pdf"
plot file."KO" pt 6 lw 2, \
	f(x) lw 2 
	
set xrange [1200:1600]
	
f(x)=v*((x-h)**(k-1))*exp(-x/th)
v=4e16
h=1204
k=1.46586
th=40.6288
fit f(x) file."GE" via v,h,k,th

set output "bultfitGE.pdf"
plot file."GE" pt 6 lw 2, \
	f(x) lw 2 
	
f(x)=v*((x-h)**(k-1))*exp(-x/th)
v=4e16
h=1204
k=4
th=34
fit f(x) file."GO" via v,h,k,th

set output "bultfitGO.pdf"
plot file."GO" pt 6 lw 2, \
	f(x) lw 2 
